package com.example.woke;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.TextView;

import com.woke.method.MyApp;
import com.zhongcai.online.R;

public class MywalletsafesetActivity extends Activity implements OnClickListener {

	private MyApp application;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate (savedInstanceState);
		setContentView (R.layout.activity_mywalletsafeset);

		application = (MyApp) getApplication ();
		intview ();

	}

	private void intview() {
		findViewById (R.id.avmywalletsafe_image_back).setOnClickListener (this);
		findViewById (R.id.avsafe_relative_paypsw).setOnClickListener (this);
		findViewById (R.id.avsafe_relative_psw).setOnClickListener (this);
		TextView mTiem = (TextView) findViewById (R.id.avsafe_text_time);
		if (application.getDatas_load () != null) {
			mTiem.setText (application.getDatas_load ().getLast_login_time ());
		}
//		findViewById(R.id.avsafe_relative_realname).setOnClickListener(this);
	}

	@Override
	public void onClick(View v) {
		Intent intent = new Intent ();
		switch (v.getId ()) {
			case R.id.avmywalletsafe_image_back:
				finish ();
				break;

			case R.id.avsafe_relative_paypsw:
				intent.setClass (MywalletsafesetActivity.this, PswchangeActivity.class);
				intent.putExtra ("name", 0);//支付密码
				startActivity (intent);
				break;

			case R.id.avsafe_relative_psw:
				intent.setClass (MywalletsafesetActivity.this, PswchangeActivity.class);
				intent.putExtra ("name", 1);//用户密码
				startActivity (intent);
				break;

//		case R.id.avsafe_relative_realname:
//			intent.setClass(MywalletsafesetActivity.this, MyRealNameActivity.class);
//			startActivity(intent);
//			break;

			default:
				break;
		}
	}
}
